package org.desktop.web.shared.domain.project.bean;

import com.google.web.bindery.autobean.shared.AutoBeanFactory;
import com.sencha.gxt.data.shared.loader.JsonReader;
import com.sencha.gxt.data.shared.loader.ListLoadResult;
import com.sencha.gxt.data.shared.loader.ListLoadResultBean;

public class ProjectDataRecordJsonReader extends
		JsonReader<ListLoadResult<Project>, ProjectRecordResult> {
	public ProjectDataRecordJsonReader(AutoBeanFactory factory,
			Class<ProjectRecordResult> rootBeanType) {
		super(factory, rootBeanType);
	}

	@Override
	protected ListLoadResult<Project> createReturnData(Object loadConfig,
			ProjectRecordResult incomingData) {
		return new ListLoadResultBean<Project>(incomingData.getRecords());
	}
}